/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef I_CAST_ENGINE_DLNA_SERVICE_H
#define I_CAST_ENGINE_DLNA_SERVICE_H

#include "iremote_broker.h"
#include "ibuffer_producer.h"
#include "cast_engine_common.h"

namespace OHOS {
namespace CastEngine {
namespace CastEngineService {

const int PLAY = 0;
const int PAUSE = 1;
const int STOP = 2;
const int FORWORD =3;
const int BACKWARD = 4;
const int GET_PLAYER_STATUS = 5;
const int GET_POSITION = 6;
const int GET_DURATION = 7;
const int SEEK = 8;
const int SET_SURFACE = 9;
const int SEND_DMR_PLAYER = 17;
const int DLNA_GET_DEVICE_NAME = 18;
const int DLNA_SET_DEVICE_NAME = 19;
const int DLNA_GET_DMR_STATES = 20;
const int DLNA_GET_VOLUME = 25;
const int DLNA_SET_VOLUME = 26;
const int AUTH_DEVICE_FAIL = 701;

class ICastEngineDlnaService : public IRemoteBroker {
public:
    DECLARE_INTERFACE_DESCRIPTOR(u"DLNA.Ability");
    virtual int32_t Play() = 0; 
    virtual int32_t Pause() = 0; 
    virtual int32_t Stop() = 0; 
    virtual int32_t Forward(int &seconds) = 0;
    virtual int32_t Backward(int &seconds) = 0;
    virtual int32_t GetPosition(int &position) = 0;
    virtual int32_t GetPlayerStatus(int32_t &playerStates) = 0;
    virtual int32_t GetDuration(int32_t &playerStates) = 0;
    virtual int32_t Seek(int position) = 0;
    virtual int32_t SetSurfaceId(std::string surfaceId) = 0;
    virtual int32_t SetDmrSurface(sptr<IBufferProducer> producer) = 0;
    virtual int32_t SendDmrPlayer(const sptr<IRemoteObject> &object) = 0;
    virtual int32_t GetDlnaDeviceName(std::string &deviceName) = 0;
    virtual int32_t SetDlnaDeviceName(const std::string &deviceName) = 0;
    virtual int32_t GetDmrState(DmrStates& dmrState) = 0;
    virtual int32_t GetVolume(int &volume, int &maxVolume) = 0;
    virtual int32_t SetVolume(int volume) = 0;
    virtual int32_t AuthDeviceFail() = 0;
};

} // namespace CastEngineService
} // namespace CastEngine
} // namespace OHOS

#endif /* I_CAST_ENGINE_DLNA_SERVICE_H */
